Skip to content

Update the metadata of the journey bundle

Request

Update the editable journey bundle information. The following fields are editable with this API.

  • name
  • description
  • latestJourneyId To update the latest journey, the following validation checks the validity of the operation.
  • The journey must exist and belong to this journey bundle
  • The journey must be launched The case when launching new journey as the latest is treated by the POST journey endpoint with the journeyBundleId.
Security
TdApikeyAuth
Path
journeyBundleIdinteger, (int64)required

Journey Bundle ID

Bodyapplication/jsonrequired

parameters to edit the name and description of the journey bundle

idstring[1-9][0-9]*
typestring
Value:"journeyBundle"
attributesobject(partial_journey.yaml-JourneyBundleMetaAttributes)
relationshipsobject
curl -i -X PATCH \
  'https://api-cdp.treasuredata.com/entities/journey_bundles/{journeyBundleId}' \
  -H 'Authorization: YOUR_API_KEY_HERE' \
  -H 'Content-Type: application/json' \
  -d '{
    "id": "string",
    "type": "journeyBundle",
    "attributes": {
      "name": "string",
      "description": "string",
      "latestJourneyId": "string"
    },
    "relationships": {
      "parentFolder": {
        "data": {
          "id": "string",
          "type": "folder-segment"
        }
      }
    }
  }'

Responses

Returns the list of the journeys

Bodyapplication/json
namestring

Name of the journey bundle

descriptionstring

Description of the journey bundle

latestJourneyIdany

Derived from the initial journey version name

lastVersionNumberinteger

The version number of the most recently created journey. If no journey has been created, this will be 0.

journeysArray of objects(JourneyJsonApiResource)
latestExecutionobject(Execution)

The most recent execution of the latest journey. If no executions have been created, this will be null.

parentSegmentLatestExecutionobject(Execution)

The most recent execution of the latest journey. If no executions have been created, this will be null.

isEligibleForOnDemandboolean

Whether the latest journey version may be triggered on demand. Clients must not recompute this from state, paused, latestJourneyId or priority-group membership. It is a necessary but not sufficient condition: true means none of the four conditions in onDemandIneligibilityReason apply, but POST /entities/journeys/{journeyId}/run may still reject the request with 409, so callers must handle that response rather than treating the button as guaranteed to succeed. Present only when checkOnDemandEligibility is true.

onDemandIneligibilityReasonstring or null

null if and only if isEligibleForOnDemand is true. When several conditions fail, the first in the order listed is returned; that order is part of the contract and follows the 422 guard order of POST /entities/journeys/{journeyId}/run. That run endpoint has two further guards this field deliberately does not evaluate, because each costs a workflow-engine round-trip and this is a GET: PARENT_SEGMENT_RUNNING and JOURNEY_WORKFLOW_RUNNING, both returned as 409. Neither value ever appears here. A journey bundle with no journey yet reports JOURNEY_NOT_ACTIVE rather than a dedicated code, so that "null if and only if eligible" holds; latestJourneyId is null in that case if you need to tell the two apart. Treat an unrecognised value as "ineligible, reason unknown" and render generic copy. Present only when checkOnDemandEligibility is true.

Enum:"JOURNEY_NOT_ACTIVE""PRIORITY_GROUP_JOURNEY_NOT_ELIGIBLE""NOT_LATEST_VERSION""PARENT_SEGMENT_NEVER_REFRESHED"
parentSegmentLastRefreshedAtstring or null

The parent segment's (audience's) matrix_updated_at formatted as ISO8601, or null if it has never been refreshed. Present only when checkOnDemandEligibility is true.

includedArray of any
Response
{ "name": "string", "description": "string", "latestJourneyId": null, "lastVersionNumber": 0, "journeys": [ { … } ], "latestExecution": { "workflowId": "string", "workflowSessionId": "string", "createdAt": "2019-08-24T14:15:22Z", "finishedAt": "2019-08-24T14:15:22Z", "status": "success", "workflowAttemptId": "string" }, "parentSegmentLatestExecution": { "workflowId": "string", "workflowSessionId": "string", "createdAt": "2019-08-24T14:15:22Z", "finishedAt": "2019-08-24T14:15:22Z", "status": "success", "workflowAttemptId": "string", "audienceId": "string" }, "isEligibleForOnDemand": true, "onDemandIneligibilityReason": "JOURNEY_NOT_ACTIVE", "parentSegmentLastRefreshedAt": "string", "included": [ { … } ] }